<!DOCTYPE html>
<html>
  <head>
    <style>
      .image {
        display: none;
      }
    </style>
    <script>
      function showImage(imageId) {
        document.getElementById('image1').style.display = 'none';
        document.getElementById('image2').style.display = 'none';
        document.getElementById(imageId).style.display = 'block';
      }
    </script>
  </head>
  <body>
    <p>点击下面的链接显示图片：</p>
    <a href="#" onclick="showImage('image1'); return false;">显示图片 1</a>
    <a href="#" onclick="showImage('image2'); return false;">显示图片 2</a>
    <img id="image1" class="image" src="/src/img/js1.png" alt="图片1">
    <img id="image2" class="image" src="/src/img/js2.png" alt="图片2">
  </body>
</html>
